package com.thinkgem.dingdan.modules.bu.enumerate;

public enum OrderStateEnum {

	ORDER_STATE_1000("待审核",1000),ORDER_STATE_1001("待生产",1001),
	ORDER_STATE_1002("生产中",1002),ORDER_STATE_1003("待发货",1003),
	ORDER_STATE_1004("待发货",1004),ORDER_STATE_1005("待收款",1005),
	ORDER_STATE_1006("已完成",1006);
	
	private Integer code;
	private String msg;
	
	private OrderStateEnum(String msg,Integer code){
		this.msg = msg;
		this.code = code;
	}
	
	public static String getName(int code){
		for(OrderStateEnum en: OrderStateEnum.values()){
			if(en.getCode() == code){
				return en.name();
			}
		}
		return null;
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}
	
}
